<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<!--模板信息-->
<div class="easyui-layout" data-options="fit:true">
	<div class="TableTitle" data-options="region:'north',border:false">
		<c:if test="${pageset.pageType==1}">新增${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==2}">修改${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==0}">浏览${JSP_Messager_Title}记录</c:if>
	</div>
	<div data-options="region:'center'">
		<form id="dom_formfarmcodetemplet">
			<input type="hidden" name="entity.id" value="${entity.id}">
			<c:if test="${pageset.pageType==1}">
				<input type="hidden" name="entity.packid" value="${packid}">
			</c:if>
			<table class="editTable">
				<tr>
					<td colspan="4" style="color: green;">
						<jsp:include page="pFarmCodeUserGuide.jsp"></jsp:include>
					</td>
				</tr>
				<tr>
					<td class="title">
						模板名称:
					</td>
					<td colspan="3">
						<input type="text" style="width: 360px;"
							class="easyui-validatebox"
							data-options="required:true,validType:[,'maxLength[64]']"
							id="entity_temname" name="entity.temname"
							value="${entity.temname}">

					</td>
				</tr>
				<tr>
					<td class="title">
						文件名称:
					</td>
					<td colspan="3">
						<input type="text" style="width: 360px;"
							class="easyui-validatebox"
							data-options="required:true,validType:[,'maxLength[64]']"
							id="entity_filename" name="entity.filename"
							value="${entity.filename}">
						<br />
						如: F8506Dao.java
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<textarea rows="300" style="width: 100%;"
							id="entity_temcontent" name="entity.temcontent">${entity.temcontent}</textarea>
					</td>
				</tr>
				<c:if test="${pageset.pageType==1}">
					<!--新增-->
				</c:if>
				<c:if test="${pageset.pageType==2}">
					<!--修改-->
				</c:if>
				<c:if test="${pageset.pageType==0}">
					<!--浏览-->
				</c:if>
			</table>
		</form>
	</div>
	<div data-options="region:'south',border:false">
		<div class="div_button" style="text-align: center; padding: 4px;">
			<c:if test="${pageset.pageType==1}">
				<a id="dom_add_entityfarmcodetemplet" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">增加</a>
			</c:if>
			<c:if test="${pageset.pageType==2}">
				<a id="dom_edit_entityfarmcodetemplet" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">修改</a>
			</c:if>
			<a id="dom_cancle_formfarmcodetemplet" href="javascript:void(0)"
				iconCls="icon-cancel" class="easyui-linkbutton"
				style="color: #000000;">取消</a>
		</div>
	</div>
</div>
<script type="text/javascript">
	var submitAddActionfarmcodetemplet = 'admin/FarmCodeTempletaddCommit.do';
	var submitEditActionfarmcodetemplet = 'admin/FarmCodeTempleteditCommit.do';
	var currentPageTypefarmcodetemplet = '${pageset.pageType}';
	var submitFormfarmcodetemplet;
	$(function() {
		//表单组件对象
		submitFormfarmcodetemplet = $('#dom_formfarmcodetemplet').SubmitForm( {
			pageType : currentPageTypefarmcodetemplet,
			grid : gridfarmcodetemplet,
			currentWindowId : 'winfarmcodetemplet'
		});
		//关闭窗口
		$('#dom_cancle_formfarmcodetemplet').bind('click', function() {
			$('#winfarmcodetemplet').window('close');
		});
		//提交新增数据
		$('#dom_add_entityfarmcodetemplet').bind(
				'click',
				function() {
					submitFormfarmcodetemplet
							.postSubmit(submitAddActionfarmcodetemplet);
				});
		//提交修改数据
		$('#dom_edit_entityfarmcodetemplet').bind(
				'click',
				function() {
					submitFormfarmcodetemplet
							.postSubmit(submitEditActionfarmcodetemplet);
				});
	});
	//-->
</script>